package com.tuanzi.loan.web.lazy.family;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.service.sms.SmsCalculateTaskService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.SmsCalculateTaskSearchRequest;
import com.tuanzi.loan.vo.response.family.SmsCalculateTaskSearchResponse;

/**
 * @author Ray 2017/09/21
 */
public class SmsCalculateTaskLazyDataModel extends BaseLazyDataModel<SmsCalculateTaskSearchRequest, SmsCalculateTaskSearchResponse> {

	private static final long serialVersionUID = 9143007553234885156L;

	private SmsCalculateTaskService smsCalculateTaskService = SpringContextHolder.getBean(SmsCalculateTaskService.class);

	public SmsCalculateTaskLazyDataModel(SmsCalculateTaskSearchRequest searchRequest) {
		super(searchRequest);
	}

	@Override
	protected Page<SmsCalculateTaskSearchResponse> doLoad(PageSearcher<SmsCalculateTaskSearchRequest> pageSearcher) {
		return smsCalculateTaskService.list(pageSearcher);
	}
}
